import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * 类说明.
 *
 * @author weibo
 * @since 2018/9/5
 */
public class Main {
    public static void main(String[] args) {
        Map<String, Object> computerProperties = new HashMap<>();
        computerProperties.put(Brand.PROPERTY, "COMPLEX");
        computerProperties.put(Color.PROPERTY, "white");

        Map<String, Object> hostProperties = new HashMap<>();
        hostProperties.put(Brand.PROPERTY, "DELL");
        hostProperties.put(Color.PROPERTY, "Black");
        hostProperties.put(Type.PROPERTY, "host");

        Map<String, Object> disPlayProperties = new HashMap<>();
        disPlayProperties.put(Brand.PROPERTY, "LG");
        disPlayProperties.put(Color.PROPERTY, "Black");
        disPlayProperties.put(Type.PROPERTY, "display");

        computerProperties.put(Parts.PROPERTY, Arrays.asList(hostProperties, disPlayProperties));

        Computer computer = new Computer(computerProperties);
        System.out.println(computer.getBrand());
        System.out.println(computer.getColor());
        computer.getParts().forEach(System.out::println);

    }
}
